#
#   PyGUI - Clip Components - Generic
#

from Geometry import add_pt, sub_pt
from Components import Component
from JHacks import * ##*change*

class ClipComponent(Component):
    """Abstract base class for components having their own
    coordinate system and clipping region."""
    
    _has_local_coords = True

#    def invalidate(self):
#        """Marks the whole view as needing to be redrawn."""
#        self.invalidate_rect(self.viewed_rect())
    
    def viewed_rect(self):
        """Returns the rectangle in local coordinates that is
        currently visible within the component."""
        width, height = self.size
        return (0, 0, width, height)
